void ConnectHost()
{
	struct sockaddr_in	server_addr;
	struct hostent *host;
	
	if((host=gethostbyname(HostName)) == NULL)
	{
		fprintf(stderr, "Gethostname error\n");
		exit(1);
	}

	if((sockfd=socket(AF_INET, SOCK_STREAM, 0)) == -1)
	{
		fprintf(stderr, "Socket error:%s\n\a", strerror(errno));
		exit(1);
	}

	bzero(&server_addr, sizeof(server_addr));
	server_addr.sin_family = AF_INET;
	server_addr.sin_port = htons(PortNumber);
	server_addr.sin_addr = *((struct in_addr *)host->h_addr);

	if(connect(sockfd, (struct sockaddr *)(&server_addr), sizeof(struct sockaddr)) == -1)
	{
		fprintf(stderr, "Connect error:%s\n\a", strerror(errno));
		exit(1);
	}
	printf("Connect to host successfully!\n");
}
